﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.biz.utils.ConfigUtil" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path+ "/";
    String resoursUrl = ConfigUtil.get("RESOURCES_URL");
%>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta charset="utf-8" />
  
<!--footer-->
<div class="am-g gdDbdiv" style="height:55px;"></div>
<div class="footeNavbar" style="height:55px;">
  <div class="am-u-sm-12 am-padding-0">
    <div class=" am-padding-0" style="width: 20%;float:left;">
      <a  onClick="clickurl(1)">
         <img id="img_home" src="<%=resoursUrl%>resources/assets/images/homeicon.png" height="29" style="padding-top: 10px;" />
         <div id="url1" >首页</div>
      </a>
    </div>
    <div class=" am-padding-0" style="width: 20%;float:left;">
      <a onClick="clickurl(2)">
      		<img id="img_rx"  src="<%=resoursUrl%>resources/assets/images/allgoodsicon.png" height="29" style="padding-top: 10px;" />
            <div id="url" >社区介绍</div>
      </a>
    </div>
      <div class=" am-padding-0" style="width: 20%;float:left;">
          <a onClick="clickurl(5)">
              <img id="img_rx2"  src="<%=resoursUrl%>resources/assets/images/lime.png" height="29" style="padding-top: 10px;" />
              <div id="url5" >社区网格</div>
          </a>
      </div>
    <div class=" am-padding-0" style="width: 20%;float:left;">
      <a  onClick="clickurl(3)">
		<img id="img_more" src="<%=resoursUrl%>resources/assets/images/buycaricon.png" height="29" style="padding-top: 12px;" />
        <div id="url3" >购物车</div>
      </a>
    </div>
    <div class=" am-padding-0" style="width: 20%;float:left;">
      <a   onClick="clickurl(4)"><img id="img_my" src="<%=resoursUrl%>resources/assets/images/personalicon.png" height="29" style="padding-top: 10px;" />
            <div id="url4">个人中心</div>
      </a>
    </div>
  </div>
</div>
<!--footer-->

  <script type="text/javascript">
   var ajaxpath="${pageContext.request.contextPath}";
   
	var site_url=window.document.location.href;

	if(site_url.indexOf("client_toHomeScreen.do") >-1)
	{
		document.getElementById("img_home").src = "<%=resoursUrl%>resources/assets/images/ckhomeicon.png";
		$("#url1").addClass("ckicontext");
	}
	else if(site_url.indexOf("client_toGoodsList.do?isTicket=0") >-1)
	{
		document.getElementById("img_rx").src = "<%=resoursUrl%>resources/assets/images/ckallgoodsicon.png";
		$("#url2").addClass("ckicontext");
	}
	else if(site_url.indexOf("client_toMycart.do") >-1)
	{
		document.getElementById("img_more").src ="<%=resoursUrl%>resources/assets/images/ckbuycaricon.png";
		$("#url3").addClass("ckicontext");
	}
	else if(site_url.indexOf("client_toClientCenter.do") >-1)
	{
		document.getElementById("img_my").src ="<%=resoursUrl%>resources/assets/images/ckpersonalicon.png";
		$("#url4").addClass("ckicontext");
	}else if(site_url.indexOf("client_toGoodsList.do?isTicket=1") >-1)
    {
        document.getElementById("img_rx2").src ="<%=resoursUrl%>resources/assets/images/lime.png";
        $("#url5").addClass("ckicontext");
    }

 
  function clickurl(urlint){
   if(urlint==1)
   {
	  window.location.href=ajaxpath+"/client_toHomeScreen.do?nowDateTime="+new Date().getTime();
    }
   else if(urlint==2)
   {
	  window.location.href=ajaxpath+"/community/toIntroduce.ac";
    }
   else if(urlint==3)
   {
	 window.location.href=ajaxpath+"/client_toMycart.do";
    }
   else if(urlint==4)
   {
	  window.location.href=ajaxpath+"/userCenter/toUserCenter.ac?nowDateTime="+new Date().getTime();
    }
   else if(urlint==5)
   {
       window.location.href=ajaxpath+"/client_toGoodsList.do?isTicket=1";
   }
  }
  </script>
